package com.dcy.mediator;

/**
 * @Author：dcy
 * @Description:
 * @Date: 2021/1/29 13:33
 */
public class Curtains extends Colleague {


    public Curtains(Mediator mediator, String name) {
        super(mediator, name);
        mediator.register(name,this);
    }

    @Override
    public void sendMessage(int stateChange) {
        this.getMediator().getMessage(stateChange,getName());
    }

    public void upCurtains() {
        System.out.println("I am holding Up Curtains!");
    }

}
